compile = g++
lib_dir = ../lib/
include_dir = ../include/
include_db_dir =  /usr/include/mysql
link_lib_dir = /usr/lib64/mysql
link_lib = -lmysqlclient
target1 = lby_sys_tools
src1 = $(target1).cpp
lib1 = lib$(target1).a
target2 = lby_comm_tools
src2 = $(target2).cpp
lib2 = lib$(target2).a

.PHONY : static
static : $(src1) $(src2)
	rm -f $(lib_dir)$(lib1) $(lib_dir)$(lib2)

	$(compile) -c -o $(target1).o $(src1) -I$(include_dir)
	ar -crv $(lib_dir)$(lib1) $(target1).o

	$(compile) -c -o $(target2).o $(src2) -I$(include_dir)
	ar -crv $(lib_dir)$(lib2) $(target2).o

	rm -f $(target1).o $(target2).o

.PHONY : clean
clean :
	rm -f $(lib_dir)/*
